home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 026-050 / scopedisk28 / getfil / filereq.h < prev    next >
C/C++ Source or Header  |  1995-03-18  |  10KB  |  526 lines

  1.  
  2. /* filereq.c */
  3.  
  4. /* created with PowerWindows 2.0 for use as a general purpose file
  5.    name requester */
  6.  
  7. UBYTE DrWFileNameGadSIBuff[33];
  8.  
  9. struct StringInfo DrWFileNameGadSInfo = {
  10.     DrWFileNameGadSIBuff,
  11.     NULL,
  12.     0,
  13.     33,
  14.     0,
  15.     0,0,0,0,0,
  16.     0,
  17.     0,
  18.     NULL
  19. };
  20.  
  21. SHORT DrWBorderVectors1[] = {
  22.     -2,-2,
  23.     242,-2,
  24.     242,9,
  25.     -2,9,
  26.     -2,-2
  27. };
  28. struct Border DrWBorder1 = {
  29.     0,0,
  30.     1,0,JAM1,
  31.     5,
  32.     DrWBorderVectors1,
  33.     NULL
  34. };
  35.  
  36. struct IntuiText DrWIText1 = {
  37.     1,0,JAM1,
  38.     -40,0,
  39.     NULL,
  40.     (UBYTE *)"file",
  41.     NULL
  42. };
  43.  
  44. struct Gadget DrWFileNameGad = {
  45.     NULL,
  46.     60,85,
  47.     240,10,
  48.     NULL,
  49.     RELVERIFY,
  50.     STRGADGET,
  51.     (APTR)&DrWBorder1,
  52.     NULL,
  53.     &DrWIText1,
  54.     NULL,
  55.     (APTR)&DrWFileNameGadSInfo,
  56.     FILENAME,
  57.     NULL
  58. };
  59.  
  60. struct IntuiText DrWIText2 = {
  61.     2,1,JAM2,
  62.     0,1,
  63.     NULL,
  64.     (UBYTE *)"",
  65.     NULL
  66. };
  67.  
  68. struct Gadget DrWDE5Gad = {
  69.     &DrWFileNameGad,
  70.     10,70,
  71.     270,10,
  72.     NULL,
  73.     RELVERIFY,
  74.     BOOLGADGET,
  75.     NULL,
  76.     NULL,
  77.     &DrWIText2,
  78.     NULL,
  79.     NULL,
  80.     DIR_ENT5,
  81.     NULL
  82. };
  83.  
  84. struct IntuiText DrWIText3 = {
  85.     2,1,JAM2,
  86.     0,1,
  87.     NULL,
  88.     (UBYTE *)"",
  89.     NULL
  90. };
  91.  
  92. struct Gadget DrWDE4Gad = {
  93.     &DrWDE5Gad,
  94.     10,60,
  95.     270,10,
  96.     NULL,
  97.     RELVERIFY,
  98.     BOOLGADGET,
  99.     NULL,
  100.     NULL,
  101.     &DrWIText3,
  102.     NULL,
  103.     NULL,
  104.     DIR_ENT4,
  105.     NULL
  106. };
  107.  
  108. struct IntuiText DrWIText4 = {
  109.     2,1,JAM2,
  110.     0,1,
  111.     NULL,
  112.     (UBYTE *)"",
  113.     NULL
  114. };
  115.  
  116. struct Gadget DrWDE3Gad = {
  117.     &DrWDE4Gad,
  118.     10,50,
  119.     270,10,
  120.     NULL,
  121.     RELVERIFY,
  122.     BOOLGADGET,
  123.     NULL,
  124.     NULL,
  125.     &DrWIText4,
  126.     NULL,
  127.     NULL,
  128.     DIR_ENT3,
  129.     NULL
  130. };
  131.  
  132. struct IntuiText DrWIText5 = {
  133.     2,1,JAM2,
  134.     0,1,
  135.     NULL,
  136.     (UBYTE *)"",
  137.     NULL
  138. };
  139.  
  140. struct Gadget DrWDE2Gad = {
  141.     &DrWDE3Gad,
  142.     10,40,
  143.     270,10,
  144.     NULL,
  145.     RELVERIFY,
  146.     BOOLGADGET,
  147.     NULL,
  148.     NULL,
  149.     &DrWIText5,
  150.     NULL,
  151.     NULL,
  152.     DIR_ENT2,
  153.     NULL
  154. };
  155.  
  156. struct IntuiText DrWIText6 = {
  157.     2,1,JAM2,
  158.     0,1,
  159.     NULL,
  160.     (UBYTE *)"",
  161.     NULL
  162. };
  163.  
  164. struct Gadget DrWDE1Gad = {
  165.     &DrWDE2Gad,
  166.     10,30,
  167.     270,10,
  168.     NULL,
  169.     RELVERIFY,
  170.     BOOLGADGET,
  171.     NULL,
  172.     NULL,
  173.     &DrWIText6,
  174.     NULL,
  175.     NULL,
  176.     DIR_ENT1,
  177.     NULL
  178. };
  179.  
  180. UBYTE DrWPathGadSIBuff[50] =
  181.     "df0:";
  182. struct StringInfo DrWPathGadSInfo = {
  183.     DrWPathGadSIBuff,
  184.     NULL,
  185.     0,
  186.     50,
  187.     0,
  188.     0,0,0,0,0,
  189.     0,
  190.     0,
  191.     NULL
  192. };
  193.  
  194. struct IntuiText DrWIText7 = {
  195.     2,0,JAM1,
  196.     -60,0,
  197.     NULL,
  198.     (UBYTE *)"Drawer",
  199.     NULL
  200. };
  201.  
  202. struct Gadget DrWPathGad = {
  203.     &DrWDE1Gad,
  204.     80,19,
  205.     190,10,
  206.     NULL,
  207.     RELVERIFY,
  208.     STRGADGET,
  209.     NULL,
  210.     NULL,
  211.     &DrWIText7,
  212.     NULL,
  213.     (APTR)&DrWPathGadSInfo,
  214.     PATH,
  215.     NULL
  216. };
  217.  
  218. struct PropInfo DrWDirPropGadSInfo = {
  219.     AUTOKNOB+FREEVERT,
  220.     0,23093,
  221.     1,4369
  222. };
  223.  
  224. struct Image DrWImage1 = {
  225.     0,18,
  226.     12,4,
  227.     0,
  228.     NULL,
  229.     0x0000,0x0000,
  230.     NULL
  231. };
  232.  
  233. struct Gadget DrWDirPropGad = {
  234.     &DrWPathGad,
  235.     281,20,
  236.     20,60,
  237.     NULL,
  238.     GADGIMMEDIATE+FOLLOWMOUSE,
  239.     PROPGADGET,
  240.     (APTR)&DrWImage1,
  241.     NULL,
  242.     NULL,
  243.     NULL,
  244.     (APTR)&DrWDirPropGadSInfo,
  245.     DIR_PROP,
  246.     NULL
  247. };
  248.  
  249.  
  250. SHORT DH0BVects[] = {
  251.     0,0,
  252.     42,0,
  253.     42,12,
  254.     0,12,
  255.     0,0
  256. };
  257. struct Border DH0Border = {
  258.     -2,-1,    /* XY origin relative to container TopLeft */
  259.     2,0,JAM1,    /* front pen, back pen and drawmode */
  260.     5,    /* number of XY vectors */
  261.     DH0BVects,    /* pointer to XY vectors */
  262.     NULL    /* next border in list */
  263. };
  264.  
  265. struct IntuiText DH0IText = {
  266.     2,0,JAM1,    /* front and back text pens, drawmode and fill byte */
  267.     5,2,    /* XY origin relative to container TopLeft */
  268.     NULL,    /* font pointer or NULL for default */
  269.     (UBYTE *)"dh0:",    /* pointer to text */
  270.     NULL    /* next IntuiText structure */
  271. };
  272.  
  273. struct Gadget DrWDH0Gad = {
  274.     &DrWDirPropGad,
  275.     191,100,    /* origin XY of hit box relative to window TopLeft */
  276.     39,11,    /* hit box width and height */
  277.     NULL,    /* gadget flags */
  278.     RELVERIFY,    /* activation flags */
  279.     BOOLGADGET,    /* gadget type flags */
  280.     (APTR)&DH0Border,    /* gadget border or image to be rendered */
  281.     NULL,    /* alternate imagery for selection */
  282.     &DH0IText,    /* first IntuiText structure */
  283.     NULL,    /* gadget mutual-exclude long word */
  284.     NULL,    /* SpecialInfo structure */
  285.     DH0_GAD,    /* user-definable data */
  286.     NULL    /* pointer to user-definable data */
  287. };
  288.  
  289. SHORT DF1BVects[] = {
  290.     0,0,
  291.     42,0,
  292.     42,12,
  293.     0,12,
  294.     0,0
  295. };
  296.  
  297. struct Border DF1Border = {
  298.     -2,-1,    /* XY origin relative to container TopLeft */
  299.     2,0,JAM1,    /* front pen, back pen and drawmode */
  300.     5,    /* number of XY vectors */
  301.     DF1BVects,    /* pointer to XY vectors */
  302.     NULL    /* next border in list */
  303. };
  304.  
  305. struct IntuiText DF1IText = {
  306.     2,0,JAM1,    /* front and back text pens, drawmode and fill byte */
  307.     5,2,    /* XY origin relative to container TopLeft */
  308.     NULL,    /* font pointer or NULL for default */
  309.     (UBYTE *)"df1:",    /* pointer to text */
  310.     NULL    /* next IntuiText structure */
  311. };
  312.  
  313. struct Gadget DrWDF1Gad = {
  314.     &DrWDH0Gad,    /* next gadget */
  315.     140,100,    /* origin XY of hit box relative to window TopLeft */
  316.     39,11,    /* hit box width and height */
  317.     NULL,    /* gadget flags */
  318.     RELVERIFY,    /* activation flags */
  319.     BOOLGADGET,    /* gadget type flags */
  320.     (APTR)&DF1Border,    /* gadget border or image to be rendered */
  321.     NULL,    /* alternate imagery for selection */
  322.     &DF1IText,    /* first IntuiText structure */
  323.     NULL,    /* gadget mutual-exclude long word */
  324.     NULL,    /* SpecialInfo structure */
  325.     DF1_GAD,    /* user-definable data */
  326.     NULL    /* pointer to user-definable data */
  327. };
  328.  
  329. SHORT DF0BVects[] = {
  330.     0,0,
  331.     42,0,
  332.     42,12,
  333.     0,12,
  334.     0,0
  335. };
  336.  
  337. struct Border DF0Border = {
  338.     -2,-1,    /* XY origin relative to container TopLeft */
  339.     2,0,JAM1,    /* front pen, back pen and drawmode */
  340.     5,    /* number of XY vectors */
  341.     DF0BVects,    /* pointer to XY vectors */
  342.     NULL    /* next border in list */
  343. };
  344.  
  345. struct IntuiText DF0IText = {
  346.     2,0,JAM1,    /* front and back text pens, drawmode and fill byte */
  347.     5,2,    /* XY origin relative to container TopLeft */
  348.     NULL,    /* font pointer or NULL for default */
  349.     (UBYTE *)"df0:",    /* pointer to text */
  350.     NULL    /* next IntuiText structure */
  351. };
  352.  
  353. struct Gadget DrWDF0Gad = {
  354.     &DrWDF1Gad,    /* next gadget */
  355.     91,100,    /* origin XY of hit box relative to window TopLeft */
  356.     39,11,    /* hit box width and height */
  357.     NULL,    /* gadget flags */
  358.     RELVERIFY,    /* activation flags */
  359.     BOOLGADGET,    /* gadget type flags */
  360.     (APTR)&DF0Border,    /* gadget border or image to be rendered */
  361.     NULL,    /* alternate imagery for selection */
  362.     &DF0IText,    /* first IntuiText structure */
  363.     NULL,    /* gadget mutual-exclude long word */
  364.     NULL,    /* SpecialInfo structure */
  365.     DF0_GAD,    /* user-definable data */
  366.     NULL    /* pointer to user-definable data */
  367. };
  368.  
  369. SHORT DrWBorderVectors3[] = {
  370.     2,-2,
  371.     48,-2,
  372.     52,2,
  373.     52,7,
  374.     48,11,
  375.     2,11,
  376.     -2,7,
  377.     -2,2,
  378.     2,-2
  379. };
  380.  
  381. struct Border DrWBorder3 = {
  382.     0,0,
  383.     2,3,JAM1,
  384.     9,
  385.     DrWBorderVectors3,
  386.     NULL
  387. };
  388.  
  389. SHORT DrWBorderVectors2[] = {
  390.     0,0,
  391.     50,0,
  392.     50,9,
  393.     0,9,
  394.     0,0
  395. };
  396.  
  397. struct Border DrWBorder2 = {
  398.     0,0,
  399.     3,3,JAM1,
  400.     5,
  401.     DrWBorderVectors2,
  402.     &DrWBorder3
  403. };
  404.  
  405. struct IntuiText DrWIText8 = {
  406.     2,0,JAM1,
  407.     1,1,
  408.     NULL,
  409.     (UBYTE *)"Cancel",
  410.     NULL
  411. };
  412.  
  413. struct Gadget DrWCancelGad = {
  414.     &DrWDF0Gad,
  415.     250,100,
  416.     50,10,
  417.     NULL,
  418.     RELVERIFY,
  419.     BOOLGADGET,
  420.     (APTR)&DrWBorder2,
  421.     NULL,
  422.     &DrWIText8,
  423.     NULL,
  424.     NULL,
  425.     CANCEL,
  426.     NULL
  427. };
  428.  
  429. SHORT DrWBorderVectors5[] = {
  430.     2,-2,
  431.     48,-2,
  432.     52,2,
  433.     52,7,
  434.     48,11,
  435.     2,11,
  436.     -2,7,
  437.     -2,2,
  438.     2,-2
  439. };
  440. struct Border DrWBorder5 = {
  441.     0,0,
  442.     2,3,JAM1,
  443.     9,
  444.     DrWBorderVectors5,
  445.     NULL
  446. };
  447.  
  448. SHORT DrWBorderVectors4[] = {
  449.     0,0,
  450.     50,0,
  451.     50,9,
  452.     0,9,
  453.     0,0
  454. };
  455. struct Border DrWBorder4 = {
  456.     0,0,
  457.     3,3,JAM1,
  458.     5,
  459.     DrWBorderVectors4,
  460.     &DrWBorder5
  461. };
  462.  
  463. struct IntuiText DrWIText9 = {
  464.     2,0,JAM1,
  465.     1,1,
  466.     NULL,
  467.     (UBYTE *)"  OK",
  468.     NULL
  469. };
  470.  
  471. struct Gadget DrWOKGad = {
  472.     &DrWCancelGad,
  473.     20,100,
  474.     50,10,
  475.     NULL,
  476.     RELVERIFY,
  477.     BOOLGADGET,
  478.     (APTR)&DrWBorder4,
  479.     NULL,
  480.     &DrWIText9,
  481.     NULL,
  482.     NULL,
  483.     OK_GAD,
  484.     NULL
  485. };
  486.  
  487. #define DrWGadgetList1 DrWOKGad
  488.  
  489. struct NewWindow DrWNewWindowStructure1 = {
  490.     160,30,
  491.     320,120,
  492.     0,1,
  493.     MOUSEBUTTONS+MOUSEMOVE+GADGETDOWN+GADGETUP,
  494.     WINDOWDRAG+ACTIVATE+RMBTRAP,
  495.     &DrWOKGad,
  496.     NULL,
  497.     (UBYTE *)"DirWindow",
  498.     NULL,
  499.     NULL,
  500.     320,120,
  501.     320,120,
  502.     WBENCHSCREEN
  503. };
  504.  
  505.  
  506. void HandleEvent(object)
  507. APTR object;
  508. {
  509.   if (object == (APTR)&DrWDF0Gad) { DF0Hit(object); return; }
  510.   if (object == (APTR)&DrWDF1Gad) { DF1Hit(object); return; }
  511.   if (object == (APTR)&DrWDH0Gad) { DH0Hit(object); return; }
  512.   if (object == (APTR)&DrWOKGad) { OKHit(object); return; }
  513.   if (object == (APTR)&DrWCancelGad) { CancelHit(object); return; }
  514.   if (object == (APTR)&DrWDirPropGad) { DirProp(object); return; }
  515.   if (object == (APTR)&DrWPathGad) { Path(object); return; }
  516.   if (object == (APTR)&DrWDE1Gad) { DirEnt(object); return; }
  517.   if (object == (APTR)&DrWDE2Gad) { DirEnt(object); return; }
  518.   if (object == (APTR)&DrWDE3Gad) { DirEnt(object); return; }
  519.   if (object == (APTR)&DrWDE4Gad) { DirEnt(object); return; }
  520.   if (object == (APTR)&DrWDE5Gad) { DirEnt(object); return; }
  521.   if (object == (APTR)&DrWFileNameGad) { FileName(object); return; }
  522. }
  523. #define HANDLEEVENT HandleEvent
  524.  
  525. /* end of PowerWindows source generation */
  526.